package com.probox.common.entity.vo.system;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.enums.PayStatusEnum;
import com.probox.common.core.text.Convert;
import com.probox.common.entity.utils.DictUtils;
import com.probox.order.api.domain.OrderItemVo;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Data
public class WorkOrderDetailVo implements Serializable {
    private String customerImage;

    private String orderStatus;

    private String orderNo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String createName;

    private String storeName;

    private String skPeople;

    private String remark;

    private String customerName;

    private String sex;

    public String getSexStr() {
        HashMap dictCacheMap = DictUtils.getDictCacheMap("customer_sex");
        return Convert.toStr(dictCacheMap.get(sex));
    }

    private String phone;

    private String levelName;

    private String orderAmount;

    private String payAmount;

    private String payBalance;

    private String payRedBag;

    private String payStatus;

    private String discountAmount;

    //人工折扣
    private String reGongMoney;

    public String getPayStatusName() {
        return PayStatusEnum.getNameByKey(payStatus);
    }


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date skDate;

    private List<OrderItemVo> list;

}
